From: Keir Fraser Date: Thu, 20 Dec 2007 16:52:44 +0000 (+0000) Subject: [qemu-dm] Fix debugging output in tpm tis model X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14445^2~102^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=3a50e363b45c23002fd1efc279938924dbcb9a4f;p=xen.git [qemu-dm] Fix debugging output in tpm tis model This fixes the debugging output. Also I am tweaking on the code trying to establish a connection with the external vTPM. Signed-off-by: Stefan Berger --- diff --git a/tools/ioemu/hw/tpm_tis.c b/tools/ioemu/hw/tpm_tis.c index 3c67921822..a4742e6a4a 100644 --- a/tools/ioemu/hw/tpm_tis.c +++ b/tools/ioemu/hw/tpm_tis.c @@ -270,11 +270,11 @@ static int create_local_socket(tpmState *s, uint32_t vtpm_instance) } #ifdef DEBUG_TPM if (success) - fprintf(logfile,"Successfully connected using local socket " - LOCAL_SOCKET_PATH ".\n"); + fprintf(logfile," Successfully connected using local socket" + "%s.\n",addr.sun_path); else - fprintf(logfile,"Could not connect to local socket " - LOCAL_SOCKET_PATH ".\n"); + fprintf(logfile," Could not connect to local socket " + "%s.\n",addr.sun_path); #endif } else { success = 0; @@ -905,9 +905,10 @@ void tpm_tis_init(SetIRQFunc *set_irq, void *opaque, int irq) register_savevm("tpm-tis", 0, 1, tpm_save, tpm_load, s); + open_vtpm_channel(s); for (c = 0; !IS_COMM_WITH_VTPM(s) && (c < 5); c++) { - open_vtpm_channel(s); sleep(1); + open_vtpm_channel(s); } }